]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
lookingGlass: Use replaceAll()
authorAlessandro Bono <alessandro.bono369@gmail.com>
Fri, 20 Feb 2026 22:56:17 +0000 (23:56 +0100)
committerMarge Bot <marge-bot@gnome.org>
Mon, 23 Feb 2026 20:25:10 +0000 (20:25 +0000)
Remove all the newlines occurrences, not just the first one.

Fixes: 52ae75d4b ("LookingGlass - JavaScript prompt and interactive Clutter controller")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4084>

js/ui/lookingGlass.js

index 41f4940f54788414fa83067cecbcdcc336e9a151..7ba30eb959b9eb19fffc1e5238bdb9f7d3a0b922 100644 (file)
@@ -1446,7 +1446,7 @@ class LookingGlass extends St.BoxLayout {
             let text = o.get_text();
             // Ensure we don't get newlines in the command; the history file is
             // newline-separated.
-            text = text.replace('\n', ' ');
+            text = text.replaceAll('\n', ' ');
             this._evaluate(text).catch(logError);
             return true;
         });